package com.warm.micro.provider.controller;

import com.warm.micro.common.vo.Resp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date: 2020/5/8 14:14
 * @Author: LChuang
 * @Description: Demo for Provider
 */
@Slf4j
@RestController
@RequestMapping("/provider")
public class ProviderController {

    @Value("${server.port}")
    private String port;

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public Resp<String> hello(String msg){
        log.error("provider.hello() ========= {}", msg);
        return Resp.success("provider-" + port + " : hello " + msg);
    }
}
